import React, {FC} from 'react';
import {Image, StyleSheet, Text, View} from 'react-native';

const Empty: FC<{title?: string}> = ({title = '暂无数据'}) => {
  return (
    <View style={{flex: 1, alignItems: 'center', paddingVertical: 100}}>
      <Image source={require('assets/error.png')} style={styles.img} />
      <Text
        style={{
          fontSize: 18,
          marginTop: 8,
        }}>
        {title}
      </Text>
    </View>
  );
};

const styles = StyleSheet.create({
  img: {
    height: 120,
    width: 120,
  },
});

export default Empty;
